
public class Queue_ImplListe implements Queue {
	private Node head;
	private Node tail;
	private Node neu;
	
	@Override
	public boolean enq(Element obj) {
		if(empty()) {
			head = new Node();
			head.setItem(obj);
			tail = head;
			return true;
		} else {
			neu = new Node();
			neu.setItem(obj);
			tail.setNext(neu);
			tail = neu;
			return true;
		}
	}

	@Override
	public Element deq() {
		if(!empty()) {
			Element el = head.getItem();
			head = head.getNext();
			return el;
		}
		return null;
	}

	@Override
	public boolean empty() {
		if(head == null)
			return true;
		return false;
	}

}
